package com.wbr.springboot.sbproject.service.serviceimpl;

import com.wbr.springboot.sbproject.dao.UserDao;
import com.wbr.springboot.sbproject.po.UserInfo;
import com.wbr.springboot.sbproject.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoServiceImpl implements UserInfoService {
    @Autowired
    private UserDao userDao;

    @Override
    public UserInfo findUserByName(String username) {
        return userDao.getUserByName(username);
    }

    @Override
    public void addUser(String username, String password) {
        userDao.AddUser(username, password);
    }

    @Override
    public List<UserInfo> getAllUSer() {
        return userDao.getAllUser();
    }
}
